﻿<%@ Page Language="C#" MasterPageFile="~/back/Site.master" AutoEventWireup="true"
    CodeFile="NewsLetter.aspx.cs" Inherits="back_NewsLetter" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            //$(".alert-error").hide();
            //$(".alert-success").hide();
        });
    </script>
    <div class="page-header">
        <h1>
            View Newsletter</h1>
    </div>
    <div id="divRed" runat="server">
        <%--<button type="button" class="close" id="closered" data-dismiss="alert">
            ×</button>
        <strong>Oh snap!</strong>&nbsp;<span id="dataRed" runat="server"></span>--%>
    </div>
    <div id="divGreen" runat="server">
        <%--<button type="button" class="close" id="closegreen" data-dismiss="alert">
            ×</button>
        <strong>Well done!</strong>&nbsp;<span id="dataGreen" runat="server"></span>--%>
    </div>
    <asp:GridView ID="grdNewsLetter" runat="server" AutoGenerateColumns="false" ShowFooter="false"
        Width="100%" OnRowCommand="grdNewsLetter_RowCommand" OnRowDataBound="grdNewsLetter_RowDataBound"
        CssClass="table table-striped">
        <Columns>
            <asp:TemplateField HeaderText="Title">
                <ItemTemplate>
                    <asp:Label ID="hdnUserId" Style="display: none;" runat="server" Text='<%#Eval("Id") %>'></asp:Label>
                    <asp:Label ID="lblPageName" runat="server" Text='<%#Eval("Subject") %>'></asp:Label>
                </ItemTemplate>
                <%--<HeaderStyle CssClass="table-header-repeat line-left min-width" />--%>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Content">
                <ItemTemplate>
                    <asp:Label ID="lblDescription" Style="display: none;" runat="server" Text='<%#Eval("Content") %>'></asp:Label>
                    <span id="spDescription" runat="server"></span>
                </ItemTemplate>
                <%--<HeaderStyle CssClass="table-header-repeat line-left min-width" />--%>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Actions">
                <ItemTemplate>
                    <asp:Button ID="btnEdit" runat="server" CommandName="EditContent" CssClass="btn btn-info"
                        Text="Edit" OnClientClick="return confirm('Do you want to edit this content?')" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnDelete" runat="server" CommandName="DeleteContent" CssClass="btn btn-danger"
                        Text="Delete" OnClientClick="return confirm('Do you want to delete this content?')" />
                </ItemTemplate>
                <%--<ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" Height="35px" />--%>
                <%--<HeaderStyle CssClass="table-header-repeat line-left min-width" />--%>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <span id="spData" runat="server"></span>
</asp:Content>
